<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // age = 20
        // let 和const 不许重复 has already been declared
        let age = 10

        // 没有提升 csnnot access 'school' before initialization
        // console.log(school);
        let school = "青芒"
        console.log(school);

        // 没有放到window
        let num = '10'
        console.log(window);

        // let 和 const
        // 有块
        // if else while do-while  for function
        {
            // 局部变量在所包围{}，出去不生效
            let i = 10
            console.log(school);
            {
                console.log(i);
            }
        }
        // const常量(一般大写)，只允许赋值一次 变量值不在改变
    </script>
</body>
</html>